
package com.microweb.toastmaster.service.impl;

import java.util.List;

import com.microweb.toastmaster.service.impl.BaseManager;
import com.microweb.toastmaster.model.Actor;
import com.microweb.toastmaster.dao.ActorDao;
import com.microweb.toastmaster.service.ActorManager;

public class ActorManagerImpl extends BaseManager implements ActorManager {
    private ActorDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setActorDao(ActorDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.microweb.toastmaster.service.ActorManager#getActors(com.microweb.toastmaster.model.Actor)
     */
    public List getActors(final Actor actor) {
        return dao.getActors(actor);
    }

    /**
     * @see com.microweb.toastmaster.service.ActorManager#getActor(String id)
     */
    public Actor getActor(final String id) {
        return dao.getActor(new Long(id));
    }

    /**
     * @see com.microweb.toastmaster.service.ActorManager#saveActor(Actor actor)
     */
    public void saveActor(Actor actor) {
        dao.saveActor(actor);
    }

    /**
     * @see com.microweb.toastmaster.service.ActorManager#removeActor(String id)
     */
    public void removeActor(final String id) {
        dao.removeActor(new Long(id));
    }
}
